#-*- coding:utf-8 -*-
# @Author : yushen
# @Time : 2020-07-20 11:15
from tests.new_InteractiveShelves.shelves_common_libs.shelf_common_lib import *
import allure

@allure.title('屏保列表')
def test_010_shelves_getScreenDetail():
    res = InteractiveShleves()
    listScreen_data = res.screens_listScreen(80)    #先列出屏保
    assert listScreen_data['code'] == '0'
    assert listScreen_data['msg'] == 'success'
    assert listScreen_data['success'] == True
    assert listScreen_data['data']['records'] != None
    screeniD = listScreen_data['data']['records'][0]['id']

    screenname = listScreen_data['data']['records'][0]['name']
    screensort = listScreen_data['data']['records'][0]['sort']

    getScreenDetail_data = res.shelves_getScreenDetail(screeniD)    #查看屏保详情
    assert getScreenDetail_data['code'] == '0'
    assert getScreenDetail_data['msg'] == 'success'
    assert getScreenDetail_data['success'] == True

    assert getScreenDetail_data['data']['name'] == screenname
    assert getScreenDetail_data['data']['sort'] == screensort




if __name__ == '__main__':
    test_010_shelves_getScreenDetail()
    print("---")